package cn.exrick.xboot.enterpriseUser.controllerImp

import cn.exrick.xboot.base.entity.Job
import cn.exrick.xboot.base.service.IJobService
import cn.exrick.xboot.base.vo.JobVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.enterpriseUser.controller.IEnterpriseUserController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class EnterpriseJobController: IEnterpriseUserController.Job{

    @Autowired
    private lateinit var iJobService: IJobService

    override fun createOrUpdateJob(job: Job?): Result<Any?>? {

        return iJobService.createOrUpdateJob(job)
    }

    override fun removeJob(ids: Array<out String>): Result<Any?>? {

        return iJobService.removeJob(ids)
    }

    override fun getJobList(pageVo: PageVo): Result<MutableMap<String, Any?>>? {

        return iJobService.getJobList(pageVo)
    }

    override fun getJobName(id: String): String? {

        return iJobService.getJobName(id)
    }

    override fun jobVoList(): Result<MutableList<JobVo>?>? {

        return iJobService.jobVoList()
    }

    override fun getJobVoListByEnterpriseId(enterpriseId: String): Result<MutableList<JobVo>>? {

        return iJobService.getJobVoListByEnterpriseId(enterpriseId)
    }
}